package binarycrew.livewallpapers;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import binarycrew.livewallpapers.wallpapers.ALiveWallpaper;

/**
 * User: Richard Mihalovič
 */
public class Preview extends View {
    private ALiveWallpaper wallpaper;

    public Preview(Context context) {
        super(context);
    }

    public Preview(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public Preview(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public void onDraw(Canvas canvas){
        wallpaper.drawCanvas(canvas);
    }

    public void setWallpaper(ALiveWallpaper wallpaper){
        this.wallpaper = wallpaper;
    }
}
